Open
Conversation
Open
Author
|
Before having solic confidence in these changes, I'll make use of the in my cad application. That should be completed within a day or two |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Rust bindings for OCCT's TDF and TNaming subsystems, surfacing stable topological shape identity across model operations. This allows for applications to be developed in accordance with OCCT expectations, and avoiding preventable topo-naming nightmares.
Work is incomplete, and the proposed API would benefit from the careful attention of an experienced eye in review.
What's in
TDF_Data,TDF_Label,TDF_Transaction,TDF_Deltawith lifetime-enforced ownership chain —'doclifetime prevents labels and transactions outliving their document, enforced at compile timeTDF_Data::Undowith consume-by-value delta semantics — applying a delta is a one-way operation; the inverse (redo) delta is returnedTNaming_Builderbindings —Generated(with and without predecessor),Modify,Delete,Select— exposed through a safe Rust API taking&Shaperather than raw&TopoDS_ShapeTnamingBuilderborrows the openTdfTransactionfor its full lifetime — the borrow checker prevents committing while a builder is liveTnamingNamedShape::get()returning the current active shape, andoriginal_shape()returning the recorded old shape — both coherent across undo/redo boundariesShape::translation() -> DVec3for location querying without leaking FFI typesget()Known gaps flagged in comments
TdfTransaction::openreturn value needs newtyping (nested transaction index)build.rslink additions for TDF/TNaming libraries may be needed depending on build configurationDisclaimer: Much of this work was done with a lot of heavy lifting coming from LLM assistance, but without LLM directly touching the codebase.